﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.Graphics;

namespace KinectPG.LibraryTestGame
{
    class Player
    {
        public List<PlayerActionLimb> ActiveLimbs { get; set; }
        public List<PlayerActionLimb> NonInteractiveLimbs { get; set; }
        public List<PlayerActionLimb> AllLimbs
        {
            get
            {
                if (allLimbs == null)
                {
                    allLimbs = new List<PlayerActionLimb>();
                    allLimbs.AddRange(ActiveLimbs);
                    allLimbs.AddRange(NonInteractiveLimbs);
                }
                return allLimbs;
            }
        }
        public int HighScore { get; set; }

        private ContentManager Content;
        private SpriteBatch spriteBatch;
        private GraphicsDevice graphics;
        private List<PlayerActionLimb> allLimbs;

        public Player(SpriteBatch sb, GraphicsDevice graphics, ContentManager content)
        {
            this.Content = content;
            this.spriteBatch = sb;
            this.graphics = graphics;

            ActiveLimbs = new List<PlayerActionLimb>();
            NonInteractiveLimbs = new List<PlayerActionLimb>();
            ActiveLimbs.Add(new PlayerActionLimb(this.spriteBatch, this.graphics, Content.Load<Texture2D>("fist"), 0.5f));
            ActiveLimbs.Add(new PlayerActionLimb(this.spriteBatch, this.graphics, Content.Load<Texture2D>("fist2"), 0.5f));
            NonInteractiveLimbs.Add(new PlayerActionLimb(this.spriteBatch, this.graphics, Content.Load<Texture2D>("head"), 0.5f));
        }
    }
}
